package JAVASE520;

public class goodstest {
    public static void main(String[] argc){
        goods[] arr=new goods[3];
        goods goods1=new goods("001","商品1号",12.21,211);
        goods goods2=new goods("002","商品2号",23.23,985);
        goods goods3=new goods("003","商品3号",62,896);
        arr[0]=goods1;
        arr[1]=goods2;
        arr[2]=goods3;
        //遍历
        for (int i = 0; i < arr.length; i++) {
            goods Goods=arr[i];
            System.out.println(Goods.getID()+","+Goods.getName()+","+Goods.getPrice()+","+Goods.getInventory());
        }
    }
}
